package com.yaozheng.vocationaltraining.fragment;

import net.sf.json.JSONObject;

import org.androidannotations.annotations.AfterViews;
import org.androidannotations.annotations.Click;
import org.androidannotations.annotations.EFragment;
import org.androidannotations.annotations.FragmentArg;
import org.androidannotations.annotations.UiThread;
import org.androidannotations.annotations.ViewById;

import android.graphics.Color;
import android.os.Bundle;
import android.os.Handler;
import android.os.Message;
import android.view.View;
import android.view.ViewGroup;
import android.webkit.WebSettings;
import android.webkit.WebView;
import android.widget.FrameLayout;
import android.widget.TextView;

import com.yaozheng.vocationaltraining.R;
import com.yaozheng.vocationaltraining.activity.BaseActivity;
import com.yaozheng.vocationaltraining.utils.ControlsUtils;
import com.yaozheng.vocationaltraining.utils.LogUtils;
import com.yaozheng.vocationaltraining.view.ItemQuestionView;
import com.yaozheng.vocationaltraining.view.paper.ItemQuestionListView;
import com.yaozheng.vocationaltraining.view.question.BaseQuestionView;
import com.yaozheng.vocationaltraining.view.question.MultipleChoiceQuestionView_;
import com.yaozheng.vocationaltraining.view.question.SingleChoiceQuestionView_;
import com.yaozheng.vocationaltraining.view.question.TrueOrFalseQuestionView_;

/**
 * 一道题目
 *
 * @author Administrator
 */
@EFragment(R.layout.fragment_item_question)
public class ItemQuestionFragment extends BaseFragment {
    @ViewById
    ItemQuestionListView itemQuestionListView;

    JSONObject itemData;
    @FragmentArg
    int position;

    public void setItemData(JSONObject itemData) {
        this.itemData = itemData;
    }

    @AfterViews
    public void initView() {
        itemQuestionListView.loadData(position, itemData);
    }

    public void updateData() {
        LogUtils.println("updateData:position=" + itemData + ";itemData=" + itemData);
        itemQuestionListView.loadData(position, itemData);
    }


}
